package com.hyp.pay.http;

import com.hyp.pay.model.BaiduJson;
import com.hyp.pay.model.FindRecharge;
import com.hyp.pay.model.JsonModel;
import com.hyp.pay.model.QQJson;
import com.hyp.pay.model.UpLodAttion;
import com.hyp.pay.model.UplodIdcard;
import com.hyp.pay.model.UserJson;

import io.reactivex.Flowable;
import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/6/1.
 */

public interface HyqApis {
//    String HOST = "http://192.168.0.107:8888/hyqPayApp/";
//    String HOST="http://116.62.219.201/hyqPayService/";
//    String HOST = "http://192.168.1.123:8888/hyqPayService/";

    String HOST = "http://pay.maicool.cn/hyqPayApp/";


    //微信扫描二维码
    @GET("interface/wepayScann/WepaySc.do")
    Flowable<String> getWeixin(@Query("GoodsName") String GoodsName, @Query("Charge") String Charge, @Query("CreatTime") String CreatTime,
                               @Query("PayType") String Type, @Query("UserId") String UserId,
                               @Query("AuthCode") String AuthCode, @Query("AddIp") String AddIp);


    //微信查询订单
    @GET("interface/wepayScann/findScannPayByTran")
    Flowable<String> getWeixinOrder(@Query("outTradeNo") String outTradeNo);


    //支付宝扫描二维码
    @GET("interface/alipayScann/ALipaySc.do")
    Flowable<String> getZhiPay(@Query("GoodsName") String goods_name, @Query("Charge") String Charge, @Query("CreatTime") String CreatTime,
                               @Query("PayType") String PayType, @Query("UserId") String UserId,
                               @Query("AuthCode") String AuthCode, @Query("AddIp") String AddIp);


    //    支付宝查询订单
    @GET("interface/alipayScann/findScannPayByTran")
    Flowable<String> getZhiPayOrder(@Query("outTradeNo") String outTradeNo);


    //百度扫描二维码
    @GET("interface/BaiduPay/authCodePay")
    Flowable<String> getBaidu(@Query("goods_name") String goods_name, @Query("total_amount") String total_amount, @Query("pay_type") String pay_type,
                              @Query("addIp") String addIp, @Query("pay_code") String pay_code, @Query("userId") String userid);


    //  百度查询订单
    @GET("interface/BaiduPay/findPayByTranNo")
    Flowable<String> getBaiduOrder(@Query("orderNo") String orderNo);

    //QQ扫描二维码
    @GET("interface/QQPay/scannPay")
    Flowable<String> getQQPay(@Query("totalFee") String totalFee, @Query("authCode") String AuthCode,
                              @Query("addip") String AddIp, @Query("userId") String userId);


    //  QQ查询订单
    @GET("interface/QQPay/findScannPayByTran")
    Flowable<String> getQQOrder(@Query("outTradeNo") String outTradeNo, @Query("addip") String addip);


    //苏宁已支付扫描二维码
    @GET("interface/suningPay/withdrawPay.do")
    Flowable<JsonModel> getSuning(@Query("receiverName") String receiverName, @Query("amount") String amount,
                                  @Query("bankName") String bankName, @Query("receiverCardNo") String receiverCardNo,
                                  @Query("bankCode") String bankCode, @Query("AddIp") String AddIp);

    //上传图片(扫码)
    @POST("picture/userSignUpdatePicture")
    @Multipart
    Flowable<String> uploadFile(@Part MultipartBody.Part file, @Part MultipartBody.Part file2,
                                @Part MultipartBody.Part file3, @Part MultipartBody.Part file4,
                                @Part MultipartBody.Part file5, @Part("userId") int id, @Part("paymentId") String orderid);


    //上传图片
    @POST("picture/idUpdatePicture")
    @Multipart
    Flowable<UplodIdcard> uploadFileIdCard(@Part MultipartBody.Part file, @Part("userId") int id);

//
//    //   身份证验证
//    @POST("user/verificationIdCard")
//    @Multipart
//    Flowable<UpLodAttion> uploadIdCard(@Part MultipartBody.Part file, @Part MultipartBody.Part file2, @Part("userId")  int id);

    //   身份证验证
    @FormUrlEncoded
    @POST("user/verificationIdCard")
    Flowable<UpLodAttion> uploadIdCard(@Field("positivePath") String positivePath, @Field("negativePath") String negativePath, @Field("userId") int id);

    //上传头像
    @POST("picture/updatePicture")
    @Multipart
    Flowable<UplodIdcard> uploadFilePicture(@Part MultipartBody.Part file, @Part("userId") int id);


    // 获取订单信息
    @FormUrlEncoded
    @POST("interfaceData/synchronization/findHyqAccountRecharge")
    Flowable<FindRecharge> findHyqAccountRecharge(@Field("transactionID") String transactionID);

    // 获取user
    @FormUrlEncoded
    @POST("interfaceData/synchronization/findHyqUser")
    Flowable<UserJson> findUser(@Field("userId") String user);

}
